<%@ page import="com.alipay.api.AlipayClient" %>
<%@ page import="com.alipay.api.DefaultAlipayClient" %>
<%@ page import="com.alipay.api.request.AlipayTradePagePayRequest" %>
<%@ page import="com.alipay.api.AlipayApiException" %>
<%@ page import="com.alipay.api.request.AlipayTradePayRequest" %>
<%@ page import="com.alipay.api.domain.AlipayTradePayModel" %>
<%@ page import="com.alipay.api.response.AlipayTradePayResponse" %>
<%@ page import="net.jeeshop.core.pay.alipay.alipayescow.config.AlipayConfig" %>
<%@ page import="net.jeeshop.core.pay.alipay.ALiPay" %>
<%@ page import="net.jeeshop.core.pay.IPay" %>
<%@ page import="net.jeeshop.core.pay.PayFactory" %><%--
  Created by IntelliJ IDEA.
  User: xvhuichuang
  Date: 2017/7/3
  Time: 下午5:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        String orderId = (String) request.getAttribute("orderId");
        String name = (String) request.getAttribute("name");
        String money = (String) request.getAttribute("money");
        AlipayConfig.BizContent bizContent = new AlipayConfig.BizContent();
        bizContent.setBody(name);
        bizContent.setOut_trade_no(orderId);
        bizContent.setTotal_amount(money);
        IPay<String, String> aliPay = PayFactory.create(PayFactory.PayType.ALI_PAY);
        String form = aliPay.pay(bizContent.getBizContent());
        response.getWriter().write(form);
    %>

</body>
</html>
